home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1997-01-29 | 3.8 KB | 125 lines |
- 10 'TIMEZONE - Time Zones - 09 MAR 96 rev. 28 SEP 96
- 20 IF EX$=""THEN EX$="EXIT"
- 30 CLS:KEY OFF
- 40 COLOR 7,0,1
- 50 UL$=STRING$(80,205)
- 60 DIM P$(24)
- 70 DATA ADAK (ALASKA) & FIJI,NEW CALEDONIA,PAPUA & SAIPAN
- 80 DATA VLADIVOSTOK & ADELAIDE,SHANGHAI & MAYLASIA,CHRISTMAS ISLAND & CHUNKING
- 90 DATA BANGLADESH & RANGOON,PAKISTAN & BOMBAY,OMAN & KANDAHAR
- 100 DATA KUWAIT & MADAGASCAR,CAIRO & ISTANBUL,PRAGUE & STOCKHLOM
- 110 DATA "GREENWICH, ENGLAND",CANARY ISLANDS & CHAD,THE AZORES & SCORESBYSUND
- 120 DATA RIO de JANEIRO & NEWFOUNDLAND,BERMUDA & GOOSE BAY,OTTAWA & NASSAU
- 130 DATA NEW ORLEANS & GUATEMALA,WYOMING & CHIHUAHUA,LOS ANGELES & VANCOUVER
- 140 DATA PITCAIRN ISAND & WHITEHORSE,HAWAII & FAIRBANKS,RARATONGA & NOME
- 150 FOR Z=24 TO 1 STEP-1:READ P$(Z):NEXT Z
- 160 '
- 170 '.....start
- 180 COLOR 15,2
- 190 PRINT " TIME ZONES (Universal Co-Ordinated Time)";
- 200 PRINT TAB(57);"by George Murphy VE3ERP ";
- 210 COLOR 1,0:PRINT STRING$(80,223);
- 220 COLOR 7,0
- 230 '
- 240 GOSUB 710 'preface
- 250 PRINT
- 260 COLOR 0,7:LOCATE 25,22
- 270 PRINT " Press 1 to continue or 0 to EXIT.....";
- 280 COLOR 7,0
- 290 Z$=INKEY$:IF Z$=""THEN 290
- 300 IF Z$="0"THEN CLS:RUN EX$
- 310 IF Z$="1"THEN 340
- 320 GOTO 290
- 330 '
- 340 COLOR 0,7:LOCATE 25,1
- 350 INPUT " ENTER: Reference time in UTC (e.g. 0517, 1625, etc.)....";ZU
- 360 COLOR 7,0
- 370 ZU=ABS(ZU)
- 380 '
- 390 '.....zones
- 400 CLS:COLOR ,,0
- 410 A=172.5
- 420 LN=0 'line number
- 430 FOR Z=-11 TO 12
- 440 LN=LN+1
- 450 ZULU=ZU+Z*100
- 460 IF ZULU>=2400 THEN ZULU=ZULU-2400:DA$=" tomorrow in ":GOTO 500
- 470 IF ZULU<0 THEN ZULU=ZULU+2400: DA$=" yesterday in ":GOTO 500
- 480 IF Z=0 THEN DA$=" TODAY in ":COLOR 14,1:GOTO 500
- 490 DA$=" today in ":COLOR 0,7:
- 500 Z$=STR$(ZULU):Z$=RIGHT$(Z$,LEN(Z$)-1)
- 510 IF LEN(Z$)<4 THEN Z$="0"+Z$:GOTO 510
- 520 Z$=RIGHT$(Z$,4)
- 530 IF Z>0 THEN A=A+15 ELSE A=A-15
- 540 IF Z<0 THEN A$="<UNK! {00F8}>W":B$=A$
- 550 IF Z=0 THEN A$="<UNK! {00F8}>W":B$="<UNK! {00F8}>E"
- 560 IF Z>0 THEN A$="<UNK! {00F8}>E":B$=A$
- 570 B=A+15:IF B>180 THEN B=B-360:B$="<UNK! {00F8}>W"
- 580 PRINT USING "####.#";ABS(A);:PRINT A$;
- 590 PRINT " to";USING "####.#";ABS(B);:PRINT B$;" = ";
- 600 PRINT "UTC ";
- 610 IF Z=0 THEN Q$=" "ELSE Q$=" = "
- 620 IF Z=0 THEN PRINT Q$;:GOTO 640
- 630 PRINT USING "+##";Z;
- 640 PRINT Q$;Z$;DA$;P$(LN)+STRING$(30-LEN(P$(LN))," ");
- 650 COLOR 7,0
- 660 IF Z<12 THEN PRINT "";
- 670 NEXT Z
- 680 GOSUB 1120
- 690 CLS:COLOR ,,1:GOTO 170
- 700 '
- 710 '.....preface
- 720 T=7
- 730 PRINT TAB(T);
- 740 PRINT "Times shown are local times. Not all countries or areas follow the"
- 750 PRINT TAB(T);
- 760 PRINT "International Time Zone System, but will use the time of some"
- 770 PRINT TAB(T);
- 780 PRINT "principal city as a standard or will have no standard time at all."
- 790 PRINT TAB(T);
- 800 PRINT "In some areas or on groups of islands the system is applied with"
- 810 PRINT TAB(T);
- 820 PRINT "certain local deviations made necessary by frontiers or to permit"
- 830 PRINT TAB(T);
- 840 PRINT "an entire island group to have the same time zone."
- 850 PRINT
- 860 PRINT TAB(T);
- 870 PRINT "The time used in each area, whether it is the time of the"
- 880 PRINT TAB(T);
- 890 PRINT "corresponding zone or modified time, is fixed by law and is called"
- 900 PRINT TAB(T);
- 910 PRINT "legal time, or more generally, standard time. Another deviation is"
- 920 PRINT TAB(T);
- 930 PRINT "that certain areas, for economic reasons, modify their legal time"
- 940 PRINT TAB(T);
- 950 PRINT "for part of the year (especially in summer) by advancing it an hour"
- 960 PRINT TAB(T);
- 970 PRINT "or another fraction of time (e.g. Daylight Saving Time)."
- 980 PRINT
- 990 PRINT TAB(T);
- 1000 PRINT "Cities and countries displayed are located within the geographic"
- 1010 PRINT TAB(T);
- 1020 PRINT "limits indicated by the meridians shown, but may observe a legal"
- 1030 PRINT TAB(T);
- 1040 PRINT "time different from the UTC standard time for that zone."
- 1050 PRINT
- 1060 PRINT TAB(T);
- 1070 PRINT "The times 0000 & 2400 (midnight) are interchangeable. 0000 refers"
- 1080 PRINT TAB(T);
- 1090 PRINT "to the day just begun, 2400 to the day just ended.";
- 1100 RETURN
- 1110 '
- 1120 'HARDCOPY
- 1130 GOSUB 1240:LOCATE 25,2:COLOR 14,6
- 1140 PRINT " Press 1 to print screen, 2 to print screen & ";
- 1150 PRINT "advance paper, or 3 to continue.";:COLOR 7,0
- 1160 Z$=INKEY$:IF Z$="3"THEN GOSUB 1240:RETURN
- 1170 IF Z$="1"OR Z$="2"THEN GOSUB 1240:GOTO 1190
- 1180 GOTO 1160
- 1190 FOR QX=1 TO 24:FOR QY=1 TO 80
- 1200 LPRINT CHR$(SCREEN(QX,QY));
- 1210 NEXT QY:NEXT QX
- 1220 IF Z$="2"THEN LPRINT CHR$(12)
- 1230 GOTO 1130
- 1240 LOCATE 25,1:PRINT STRING$(80,32);:RETURN
-